<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <p></p>
    <p></p>
    <p></p>

    <script>

        
        // 伪数组
        //   arguments 
        //   nodeList
        //   classList
        //   HTMLCollection


        // 伪数组转真数组
        //   遍历，把值存入新数组
        //   展开运算符




        function fn() {
            console.log(arguments);
        }

        fn(1,2,3,4)

        const arr = [1,2,3,4] ;
        console.log(arr);

        let oPs = document.getElementsByTagName('p') ;

        // oPs = [...oPs] ;   // 展开运算符

        let arr2 = [] ;
        for(let i = 0 ; i < oPs.length ; i++) {
            arr2.push(oPs[i]) ;
        }
        console.log(arr2);

        arr2.push('a') ;
        console.log(arr2);

        arr2.forEach( v => {    // 没有forEach这个方法
            console.log(v);
        })

    </script>
    
</body>
</html>